<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.TScrollBar类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_t_scroll_bar.html">TScrollBar</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="classawtk_1_1_t_scroll_bar-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.TScrollBar类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
类 awtk.TScrollBar 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classawtk_1_1_t_scroll_bar.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a3ac75fbc3d6f04620ad4cc08813277db"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#a3ac75fbc3d6f04620ad4cc08813277db">TScrollBar</a> (long nativeObj)</td></tr>
<tr class="separator:a3ac75fbc3d6f04620ad4cc08813277db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae45968b9e34b738bd6cf522e436729a5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#ae45968b9e34b738bd6cf522e436729a5">setParams</a> (int virtual_size, int row)</td></tr>
<tr class="separator:ae45968b9e34b738bd6cf522e436729a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e55603e1393c5e8fd68aa2e938a9202"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#a7e55603e1393c5e8fd68aa2e938a9202">scrollTo</a> (int value, int duration)</td></tr>
<tr class="separator:a7e55603e1393c5e8fd68aa2e938a9202"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aefbcd480ca98162271afb478144499c9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#aefbcd480ca98162271afb478144499c9">setValue</a> (int value)</td></tr>
<tr class="separator:aefbcd480ca98162271afb478144499c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae17bc443fb6ac2dfad11ae644c84cb0a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#ae17bc443fb6ac2dfad11ae644c84cb0a">addDelta</a> (int delta)</td></tr>
<tr class="separator:ae17bc443fb6ac2dfad11ae644c84cb0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0cc8d1b888649031879bb26cc020416"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#aa0cc8d1b888649031879bb26cc020416">scrollDelta</a> (int delta)</td></tr>
<tr class="separator:aa0cc8d1b888649031879bb26cc020416"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8b450c26720e05bd00d3b26e5402d4a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#ac8b450c26720e05bd00d3b26e5402d4a">setValueOnly</a> (int value)</td></tr>
<tr class="separator:ac8b450c26720e05bd00d3b26e5402d4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab54fd12f2f7694d357eac18c13f769ac"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#ab54fd12f2f7694d357eac18c13f769ac">isMobile</a> ()</td></tr>
<tr class="separator:ab54fd12f2f7694d357eac18c13f769ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab325c30b7c0d1a0476709a459ef68753"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#ab325c30b7c0d1a0476709a459ef68753">getVirtualSize</a> ()</td></tr>
<tr class="separator:ab325c30b7c0d1a0476709a459ef68753"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada8b1df5912c11843c589269657f0be1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#ada8b1df5912c11843c589269657f0be1">getRow</a> ()</td></tr>
<tr class="separator:ada8b1df5912c11843c589269657f0be1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad17149e5b96cdda02a562cc905ca851d"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#ad17149e5b96cdda02a562cc905ca851d">getAnimatable</a> ()</td></tr>
<tr class="separator:ad17149e5b96cdda02a562cc905ca851d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a5396e1ecc033f812bec1cfa12bf658d8"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_t_scroll_bar.html">TScrollBar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#a5396e1ecc033f812bec1cfa12bf658d8">cast</a> (long nativeObj)</td></tr>
<tr class="separator:a5396e1ecc033f812bec1cfa12bf658d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2cc4fc8818e340df17dd72e89092b348"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#a2cc4fc8818e340df17dd72e89092b348">create</a> (TWidget parent, int x, int y, int w, int h)</td></tr>
<tr class="separator:a2cc4fc8818e340df17dd72e89092b348"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bf90d687543ada13e699866c1f30ef5"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_t_scroll_bar.html">TScrollBar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#a3bf90d687543ada13e699866c1f30ef5">cast</a> (TWidget widget)</td></tr>
<tr class="separator:a3bf90d687543ada13e699866c1f30ef5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bd0b1b4d006205a40520139ca0374bd"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#a4bd0b1b4d006205a40520139ca0374bd">createMobile</a> (TWidget parent, int x, int y, int w, int h)</td></tr>
<tr class="separator:a4bd0b1b4d006205a40520139ca0374bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a717286fdb8f8e51a52389cae0c567cf0"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_scroll_bar.html#a717286fdb8f8e51a52389cae0c567cf0">createDesktop</a> (TWidget parent, int x, int y, int w, int h)</td></tr>
<tr class="separator:a717286fdb8f8e51a52389cae0c567cf0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>滚动条控件。</p>
<blockquote class="doxtable">
<p>目前只支持垂直滚动。 </p>
</blockquote>
<p>scroll_bar_t是widget\_t的子类控件，widget_t的函数均适用于scroll_bar_t控件。</p>
<p>在xml中使用"scroll\_bar"或"scroll\_bar\_d"或"scroll\_bar\_m"标签创建滚动条控件。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">list_view</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;0&quot;</span>  <span class="keyword">y</span>=<span class="stringliteral">&quot;30&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;-80&quot;</span> <span class="keyword">item_height</span>=<span class="stringliteral">&quot;60&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">scroll_view</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;view&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;0&quot;</span>  <span class="keyword">y</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;100%&quot;</span>&gt;</div>
<div class="line">*...</div>
<div class="line">*&lt;/<span class="keywordtype">scroll_view</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">scroll_bar_m</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;bar&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;right&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;6&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">value</span>=<span class="stringliteral">&quot;0&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">list_view</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考：[list_view_m.xml]( </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/list_view_m.xml">https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/list_view_m.xml</a>)</p>
<p>在c代码中使用函数scroll_bar_create创建列表项控件。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;default&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">normal</span> <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#c0c0c0&quot;</span> <span class="keyword">fg_color</span>=<span class="stringliteral">&quot;#808080&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">over</span> <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#c0c0c0&quot;</span> <span class="keyword">fg_color</span>=<span class="stringliteral">&quot;#808080&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">pressed</span> <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#c0c0c0&quot;</span> <span class="keyword">fg_color</span>=<span class="stringliteral">&quot;#808080&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">style</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考：[theme default]( </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/styles/default.xml#L350">https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/styles/default.xml#L350</a>) </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a3ac75fbc3d6f04620ad4cc08813277db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ac75fbc3d6f04620ad4cc08813277db">&#9670;&nbsp;</a></span>TScrollBar()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">awtk.TScrollBar.TScrollBar </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>nativeObj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>通过nativeObj构造Java对象。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">nativeObj</td><td>原生对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对应的Java对象。 </dd></dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="ae17bc443fb6ac2dfad11ae644c84cb0a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae17bc443fb6ac2dfad11ae644c84cb0a">&#9670;&nbsp;</a></span>addDelta()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TScrollBar.addDelta </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>delta</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>在当前的值上增加一个值，并触发EVT_VALUE_CHANGED事件。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">delta</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a5396e1ecc033f812bec1cfa12bf658d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5396e1ecc033f812bec1cfa12bf658d8">&#9670;&nbsp;</a></span>cast() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_t_scroll_bar.html">TScrollBar</a> awtk.TScrollBar.cast </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>nativeObj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>把nativeObj转换层Java对象。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">nativeObj</td><td>原生对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对应的Java对象。 </dd></dl>

</div>
</div>
<a id="a3bf90d687543ada13e699866c1f30ef5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3bf90d687543ada13e699866c1f30ef5">&#9670;&nbsp;</a></span>cast() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_t_scroll_bar.html">TScrollBar</a> awtk.TScrollBar.cast </td>
          <td>(</td>
          <td class="paramtype">TWidget&#160;</td>
          <td class="paramname"><em>widget</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换为scroll_bar对象(供脚本语言使用)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">widget</td><td>scroll_bar对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>scroll_bar对象。 </dd></dl>

</div>
</div>
<a id="a2cc4fc8818e340df17dd72e89092b348"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2cc4fc8818e340df17dd72e89092b348">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static TWidget awtk.TScrollBar.create </td>
          <td>(</td>
          <td class="paramtype">TWidget&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建scroll_bar对象</p>
<blockquote class="doxtable">
<p>根据宏WITH_DESKTOP_STYLE决定创建desktop风格还是mobile风格的滚动条 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="a717286fdb8f8e51a52389cae0c567cf0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a717286fdb8f8e51a52389cae0c567cf0">&#9670;&nbsp;</a></span>createDesktop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static TWidget awtk.TScrollBar.createDesktop </td>
          <td>(</td>
          <td class="paramtype">TWidget&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建desktop风格的scroll_bar对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="a4bd0b1b4d006205a40520139ca0374bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bd0b1b4d006205a40520139ca0374bd">&#9670;&nbsp;</a></span>createMobile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static TWidget awtk.TScrollBar.createMobile </td>
          <td>(</td>
          <td class="paramtype">TWidget&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建mobile风格的scroll_bar对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="ad17149e5b96cdda02a562cc905ca851d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad17149e5b96cdda02a562cc905ca851d">&#9670;&nbsp;</a></span>getAnimatable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.TScrollBar.getAnimatable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>滚动时是否启用动画。 </p>

</div>
</div>
<a id="ada8b1df5912c11843c589269657f0be1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada8b1df5912c11843c589269657f0be1">&#9670;&nbsp;</a></span>getRow()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TScrollBar.getRow </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>行的高度。 </p>

</div>
</div>
<a id="ab325c30b7c0d1a0476709a459ef68753"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab325c30b7c0d1a0476709a459ef68753">&#9670;&nbsp;</a></span>getVirtualSize()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TScrollBar.getVirtualSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>虚拟宽度或高度。 </p>

</div>
</div>
<a id="ab54fd12f2f7694d357eac18c13f769ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab54fd12f2f7694d357eac18c13f769ac">&#9670;&nbsp;</a></span>isMobile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.TScrollBar.isMobile </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>判断是否是mobile风格的滚动条。</p>
<dl class="section return"><dt>返回</dt><dd>返回TRUE表示是mobile风格的，否则表示不是mobile风格的。 </dd></dl>

</div>
</div>
<a id="aa0cc8d1b888649031879bb26cc020416"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0cc8d1b888649031879bb26cc020416">&#9670;&nbsp;</a></span>scrollDelta()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TScrollBar.scrollDelta </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>delta</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>在当前的值上增加一个值，并滚动到新的值，并触发EVT_VALUE_CHANGED事件。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">delta</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a7e55603e1393c5e8fd68aa2e938a9202"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e55603e1393c5e8fd68aa2e938a9202">&#9670;&nbsp;</a></span>scrollTo()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TScrollBar.scrollTo </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>duration</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>滚动到指定的值。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。 </td></tr>
    <tr><td class="paramname">duration</td><td>动画持续时间。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ae45968b9e34b738bd6cf522e436729a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae45968b9e34b738bd6cf522e436729a5">&#9670;&nbsp;</a></span>setParams()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TScrollBar.setParams </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>virtual_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置参数。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">virtual_size</td><td>虚拟高度。 </td></tr>
    <tr><td class="paramname">row</td><td>每一行的高度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aefbcd480ca98162271afb478144499c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aefbcd480ca98162271afb478144499c9">&#9670;&nbsp;</a></span>setValue()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TScrollBar.setValue </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置值，并触发EVT_VALUE_CHANGED事件。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ac8b450c26720e05bd00d3b26e5402d4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8b450c26720e05bd00d3b26e5402d4a">&#9670;&nbsp;</a></span>setValueOnly()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TScrollBar.setValueOnly </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置值，但不触发EVT_VALUE_CHANGED事件。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/TScrollBar.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
